using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Conditional
{
    /// <summary>
    /// <para>Pick</para>
    /// <para>The value from a position raster is used to determine from which raster in a list of input rasters the output cell value will be obtained.</para>
    /// <para>位置栅格的值用于确定将从输入栅格列表中的哪个栅格获取输出像元值。</para>
    /// </summary>    
    [DisplayName("Pick")]
    public class Pick : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Pick()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_position_raster">
        /// <para>Input position raster</para>
        /// <para><xdoc>
        ///   <para>The input raster defining the position of the raster to use for the output value.</para>
        ///   <para>The input can be an integer or float raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义用于输出值的栅格位置的输入栅格。</para>
        ///   <para>输入可以是整数栅格或浮点栅格。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_rasters_or_constants">
        /// <para>Input rasters or constant values</para>
        /// <para><xdoc>
        ///   <para>The list of inputs from which the output value will be selected.</para>
        ///   <para>The inputs can be integer or float rasters. A number can also be used as an input.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将从中选择输出值的输入列表。</para>
        ///   <para>输入可以是整数栅格或浮点栅格。数字也可以用作输入。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output raster.</para>
        /// <para>输出栅格。</para>
        /// </param>
        public Pick(object _in_position_raster, List<object> _in_rasters_or_constants, object _out_raster)
        {
            this._in_position_raster = _in_position_raster;
            this._in_rasters_or_constants = _in_rasters_or_constants;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Pick";

        public override string CallName => "sa.Pick";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_position_raster, _in_rasters_or_constants, _out_raster, _process_as_multiband.GetGPValue()];

        /// <summary>
        /// <para>Input position raster</para>
        /// <para><xdoc>
        ///   <para>The input raster defining the position of the raster to use for the output value.</para>
        ///   <para>The input can be an integer or float raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义用于输出值的栅格位置的输入栅格。</para>
        ///   <para>输入可以是整数栅格或浮点栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input position raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_position_raster { get; set; }


        /// <summary>
        /// <para>Input rasters or constant values</para>
        /// <para><xdoc>
        ///   <para>The list of inputs from which the output value will be selected.</para>
        ///   <para>The inputs can be integer or float rasters. A number can also be used as an input.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将从中选择输出值的输入列表。</para>
        ///   <para>输入可以是整数栅格或浮点栅格。数字也可以用作输入。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input rasters or constant values")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_rasters_or_constants { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster.</para>
        /// <para>输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Process as multiband</para>
        /// <para><xdoc>
        ///   <para>Specifies how the input multiband raster bands will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Each band from a multiband raster input will be processed separately as a single band raster. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Each multiband raster input will be processed as a multiband raster. The operation will be performed for each band from one input using the corresponding band number from the other inputs.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理输入多波段栅格波段。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—多波段栅格输入中的每个波段将作为单波段栅格单独处理。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—每个多波段栅格输入将作为多波段栅格进行处理。将使用来自其他输入的相应频段编号对一个输入的每个频段执行该操作。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process as multiband")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_as_multiband_value _process_as_multiband { get; set; } = _process_as_multiband_value._false;

        public enum _process_as_multiband_value
        {
            /// <summary>
            /// <para>SINGLE_BAND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLE_BAND")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>MULTI_BAND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTI_BAND")]
            [GPEnumValue("true")]
            _true,

        }

        public Pick SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}